<!DOCTYPE html>
<html lang="zn" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" th:href="@{/thymeleaf/thymeleaf.css}" >
  <title>Hello Thymeleaf</title>
</head>
<body style="background: darkseagreen">
<h1>
  你好: <span th:text="${name}">这里显示欢迎的信息</span>,欢迎你使用thymeleaf
  <br>变量表达式：
  <p th:text="${result}">result</p>
  <p th:text="${10+8}">result</p>
  <p th:text="${1<2}">result</p>
  <p th:if="${stu.isLove}">是爱我滴</p>
   选择变量表达式：
  <div th:object="${stu}" class="thymeleaf">
  <span th:text="*{name}">姓名</span>
  <span th:text="*{age}">年龄</span>
    <span th:text="*{address}">地址</span>
    <br>
  </div>
  数组：
  <ul>
  <li th:each="student:${stu.students}" th:text="${student}"></li>
</ul>
  选择<br>王祖贤是：
  <div th:switch="${stu.sex}" style="display: inline-block">
    <p th:case="1">男生</p>
    <p th:case="2">女生</p>
    <p th:case="3">人妖</p>
  </div>
  <br>链接表达式
  <nav>
    <a th:href="@{https://www.baidu.com/}">这是绝对网址，点进去便是百度</a>
  </nav>
  片段表达式
  <div th:replace="~{component::com1}"></div>
  <div th:insert="~{component::com1}"></div>
  <div th:replace="~{component::#com2}"></div>
  <div th:insert="~{component::#com2}"></div>
</h1>
</body>
</html>